<!-- 注册 -->
<div id="homePageId" class="kaultra-container"></div>
<script>
    layui.use(['kahtml','jquery'], function () {
        var $ = layui.jquery;
        // 首页ID 首页L 日程  首页L新闻 首页L会议 首页L待办 首页L文件
        var registerkey = kaRegisterPrimaryKey.registerId([
            "homePageId",
            "homePageList",
            "homePageSchedule",
            "homePageListNew",
            "homePageListMeeting",
            "homePageListTodo",
            "homePageListFile",
            "homePageListNewTabs",
            "homePageListNewTabs1",
            "homePageListNewTabs2",
            "homePageListNewTabs3",
            "homePageListNewTabs4",
            "homePageListNewTabs5",
            "homePageListNewPanel",
            "homePageListNewPanelGrid1",
            "homePageListNewPanelGrid2",
            "homePageListNewPanelGrid11",
            "homePageListNewPanelGrid12"]);
        if(registerkey.judge) {
            var kahtml = layui.kahtml;
            // 表格分栅格
            gridHtmlData = {
                id: registerkey.ids[0],
                colSpace: 2, // Grid 间隔
                list: [{
                    id: registerkey.ids[1],
                    colXs: 9
                },{
                    id: registerkey.ids[2],
                    colXs: 3
                }] // 循环数据
            }
            kahtml.getTemplateHtml("grid", gridHtmlData);
            // 表格分栅格
            gridHtmlData = {
                id: registerkey.ids[1],
                colSpace: 2, // Grid 间隔
                list: [{
                    id: registerkey.ids[3],
                    colXs: 7
                },{
                    id: registerkey.ids[4],
                    colXs: 5
                },{
                    id: registerkey.ids[5],
                    colXs: 7
                },{
                    id: registerkey.ids[6],
                    colXs: 5
                }] // 循环数据
            }
            kahtml.getTemplateHtml("grid", gridHtmlData);
            // 面板1
            panelHtmlData1 = {
                id: registerkey.ids[3],
                list: [{
                    id: registerkey.ids[13],
                    style: "padding-left: 10px;padding-right: 10px;"
                }] 
            }
            kahtml.getTemplateHtml("panel", panelHtmlData1);
            // 标签页
            tabsHtmlData1 = {
                id: registerkey.ids[13],
                list: [{
                    id: registerkey.ids[7],
                    list: [{
                        id: registerkey.ids[8],
                        layuithis: 1,
                        title: "最新新闻",
                        style: "height: 300px;"
                    },{
                        id: registerkey.ids[9],
                        layuithis: 1,
                        title: "公司新闻",
                        style: "height: 300px;"
                    },{
                        id: registerkey.ids[10],
                        layuithis: 1,
                        title: "通知公告",
                        style: "height: 300px;"
                    },{
                        id: registerkey.ids[11],
                        layuithis: 1,
                        title: "规章制度",
                        style: "height: 300px;"
                    },{
                        id: registerkey.ids[12],
                        layuithis: 1,
                        title: "知识库",
                        style: "height: 300px;"
                    }]
                }] 
            }
            kahtml.getTemplateHtml("tabs", tabsHtmlData1);
            kahtml.refreshTabs(registerkey.ids[7]); //渲染标签页
            // 表格分栅格
            gridHtmlData8 = {
                id: registerkey.ids[8],
                list: [{
                    id: registerkey.ids[14],
                    colXs: 5,
                    style: "height: 285px;background: #f0faff;margin-top: 8px;border-radius: 10px;padding: 15px;"
                },{
                    id: registerkey.ids[15],
                    colXs: 7,
                    style: "height: 295px;padding: 10px;padding-left: 15px;padding-right: 0px;"
                }] // 循环数据
            }
            kahtml.getTemplateHtml("grid", gridHtmlData8);
            // 表格分栅格
            card1HtmlData = {
                id: registerkey.ids[14],
                list: [{
                    id: registerkey.ids[16],
                    img: "../admin/images/21.jpg",
                    title: "测试标题",
                    totiao: "头条",
                    content: "1111111111111111",
                    time: "2025-07-24 11:14:56"
                }]
            }
            kahtml.getTemplateHtml("card_1", card1HtmlData);
            // 表格分栅格
            list1HtmlData = {
                id: registerkey.ids[15],
                list: [{
                    id: registerkey.ids[17],
                    bgboolean: true,
                    fyboolean: true
                }]
            }
            kahtml.getTemplateHtml("list_1", list1HtmlData);
            // 最新新闻
            kahtml.refreshList1(list1HtmlData); //渲染标签页
        }
    })
</script>